package com.hongyue.zuoTi7;

import java.util.Objects;

public class XueYuan {
    private String xingMing;
    private int nianLing;
    private char xingBie;

    @Override
    public String toString() {
        return "XueYuan{" +
                "xingMing='" + xingMing + '\'' +
                ", nianLing=" + nianLing +
                ", xingBie=" + xingBie +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        XueYuan xueYuan = (XueYuan) o;
        return nianLing == xueYuan.nianLing &&
                xingBie == xueYuan.xingBie &&
                Objects.equals(xingMing, xueYuan.xingMing);
    }

    @Override
    public int hashCode() {
        return Objects.hash(xingMing, nianLing, xingBie);
    }

    public XueYuan(String xingMing, int nianLing, char xingBie) {
        this.xingMing = xingMing;
        this.nianLing = nianLing;
        this.xingBie = xingBie;
    }

    public XueYuan() {
    }

    public String getXingMing() {
        return xingMing;
    }

    public void setXingMing(String xingMing) {
        this.xingMing = xingMing;
    }

    public int getNianLing() {
        return nianLing;
    }

    public void setNianLing(int nianLing) {
        this.nianLing = nianLing;
    }

    public char getXingBie() {
        return xingBie;
    }

    public void setXingBie(char xingBie) {
        this.xingBie = xingBie;
    }
}
